<?php
namespace app\index\controller;
use think\Controller;
class Login extends Controller
{
    public function login()
    {
         return $this->fetch();
    }

    public function doLogin()
    {
    	$data = input('post.');
    	// print_r($data);
    	$model = model('User');
    	$res = $model->selOne('login');

    	if($res)
    	{
    		$this->success('登录成功','Index/index');
    	}else{
    		$this->error('登录失败');
    	}
    }
}